package pkg

import (
	"encoding/json"
	"fmt"
	"github.com/Baidu-AIP/golang-sdk/aip/censor"
)

func WbShen(message string) bool {
	client := censor.NewClient("kPHnyx34KHraq68EKPALjrXz", "UMMZI68XylbQDjnPAtGcw3484zfRxai6")
	res := client.TextCensor(message)
	fmt.Println(res)
	var t T
	json.Unmarshal([]byte(res), &t)
	if t.Conclusion == "合规" {
		return true
	}
	return false
}

type T struct {
	Conclusion string `json:"conclusion"`
}
